package org.dxw.service.impl;

import cn.hutool.core.collection.CollUtil;
import lombok.extern.slf4j.Slf4j;
import org.dxw.DO.UserRoleMenuWideTableDO;
import org.dxw.service.UserRoleMenuWideTableService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author dxw
 * @Date 2023/11/19 22:46
 * @Description
 */
@Service
@Slf4j
public class UserRoleMenuWideTableServiceImpl implements UserRoleMenuWideTableService {


    @Override
    public boolean updateData(List<UserRoleMenuWideTableDO> userRoleMenuWideTableDOS) {
        log.info("监听到表变动，开始刷新宽表数据");
        if(CollUtil.isEmpty(userRoleMenuWideTableDOS)) {
            batchUpdateSomeRow(userRoleMenuWideTableDOS);
        }else{
            wholeUpdate();
        }
        return true;
    }

    private void batchUpdateSomeRow(List<UserRoleMenuWideTableDO> userRoleMenuWideTableDOS){
    }

    private void wholeUpdate(){

    }

}
